<template>
    <div class="mask" :class="{hidden: hidden}">
        <div class="loader-box">
            <div class="toast"><i class="icon icon-exclamation-sign"></i>{{text}}</div>
        </div>
    </div>
</template>
<script>
    export default {
        name: 'Toast',
        data() {
            return {
                text: '',
                hidden: true
            }
        },
        created() {
            // this.loadingText = this.props.loadingText;
        },
        methods: {
            show(text, mic) {
                let that = this;
                this.text = text ? text : this.$t('server errors');
                this.hidden = false;
                setTimeout(() => {
                    that.hidden = true;
                }, mic | 2000);
            }
        }
    }
</script>